1. Field of the Invention
The present invention relates to a moving picture coding system, and more particularly, to a moving picture coding method to enhance coding efficiency.
2. Description of the Related Art
It is desirable to detect a scene change in a sequence of moving pictures so as to compress and code a moving picture sequence optimally. This is because many video applications, such as the news, sports broadcasting, a close-up conversation like an interview, multi-point video conferencing, etc., include repeated scene changes. A scene change can occur an entire picture or in some area of the picture.
The digital image coding method may be changed whenever a scene change is detected. For example, since similarity is very low between a picture in a new scene and a picture in a previous scene, a picture after a scene change is coded using an intra mode in which a picture is coded using prediction only from decoded samples within the same picture rather than by an inter mode in which a picture is coded by motion compensation from previously-decoded reference pictures.
In more detail, a picture in which a scene change occurs in the entire picture, is an intra picture that is coded in the intra mode on all image blocks forming the picture. Meanwhile, in the case of a picture in which a scene change occurs at some area, all blocks within the areas in which scene changes occur are coded in the intra mode. Since the intra mode coding generates more bits as compared with inter mode coding, a sequence in which scene changes occur very frequently results in low bit rate coding.
Inter mode coding may produce P pictures and B pictures. Generally, when using a B picture in a moving picture coding system, the coding order is different from the displaying order.
FIG. 1 illustrates an example display order including B pictures. As shown in FIG. 1, an intra picture I is displayed first among pictures to be displayed. Two B pictures B1 and B2 are displayed after the intra picture I. A P picture P3 is displayed after the B pictures B1 and B2 are displayed. The fourth and fifth B pictures B4 and B5 are displayed after the P picture P3 is displayed, and subsequently, a P picture P6 is displayed. This pattern continues to repeat until the next I picture.
However, the coding order of a digital image is not the same as the display order. In other words, the P picture is coded prior to the B picture.
FIG. 2 illustrates an example coding order associated with the display order of FIG. 1. As shown in FIG. 2, if an intra picture I is coded, the P picture P3 is coded and then the two B pictures B1 and B2 that are displayed prior to the P picture P3 are coded. After that, pictures P6, B4, B5, P9, B7, B8, P12, B10 and B11 are coded.
Here, the B pictures have five coding modes such as intra mode, forward mode, backward mode, bi-predictive mode and direct mode. The bi-predictive mode uses two reference pictures. The two reference pictures are both located prior to or after the B picture or one of them is located prior to the B picture and the other is located after the B picture.
The direct mode utilizes temporal redundancy to maintain motion continuity between two adjacent pictures. In other words, in the direct mode, a forward motion vector and a backward motion vector of the direct mode for the B picture are derived from the motion vector of a co-located block in a subsequent picture located just after the B picture. Such a direct mode does not need overhead bits such as motion information so that the bit rate can be reduced.
Here, the forward motion vector MVf and the backward motion vector Mvb of the conventional direct mode are obtained by scaling the motion vector MV using a time distance between pictures when the co-located block in a subsequent picture has a motion vector Mv. In other words, the forward motion vector MVf and the backward motion vector MVb are determined using the following Equations 1 and 2 below:
      Equation    ⁢                  ⁢    1    ⁢          :            MVf    =                  TRb        *        MV            TRd            Equation    ⁢                  ⁢    2    ⁢          :            MVb    =                            (                      TRd            -            TRb                    )                *        MV            TRd      where MV is the motion vector of the co-located block in the subsequent picture, Mvf is the forward motion vector of the direct mode for a B picture, MVb is the backward motion vector of the direct mode for the B picture, TRd is a time distance between the subsequent picture and a reference picture pointed by the motion vector of the co-located block in the subsequent picture, and TRb is a time distance between a B picture and a reference picture pointed by the motion vector of the co-located block in the subsequent picture.
In the direct mode, two motion-compensated blocks are obtained using the two motion vectors MVf and MVb, and a prediction block is obtained by averaging or interpolative calculation of the two motion-compensated blocks.